/*
 * Statistics.h
 *
 *  Created on: 05/12/2012
 *      Author: Maor
 */

#ifndef STATISTICS_H_
#define STATISTICS_H_

typedef AVLtree<Node> VoteTree;
typedef AVLtree<Party> ParTree;
class Statistics {
private:
	ParTree parties;
	VoteTree votes;
public:
	Statistics();
	bool addParty(int id);
	bool removeParty(int id);
	bool vote(int id,int votes);
	bool mergeParties(int id1,int id2);
	int getVotes(int id) const;
	bool GetPartiesInRange(int low,int high,int* count,int** parties) const;
	bool GetAllParties(int** partyIds,int** votes,int* count) const;
	~Statistics();
};

#endif /* STATISTICS_H_ */
